Optimal. Leaf size=170 \[ \frac {(c-i d)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{(i a+b) f}-\frac {(c+i d)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c+i d}}\right )}{(i a-b) f}-\frac {2 (b c-a d)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {b} \sqrt {c+d \tan (e+f x)}}{\sqrt {b c-a d}}\right )}{\sqrt {b} \left (a^2+b^2\right ) f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.34, antiderivative size = 170, normalized size of antiderivative = 1.00, number of steps
used = 11, number of rules used = 6, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {3654, 3620,
3618, 65, 214, 3715} \begin {gather*} -\frac {2 (b c-a d)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {b} \sqrt {c+d \tan (e+f x)}}{\sqrt {b c-a d}}\right )}{\sqrt {b} f \left (a^2+b^2\right )}+\frac {(c-i d)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{f (b+i a)}-\frac {(c+i d)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c+i d}}\right )}{f (-b+i a)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 214
Rule 3618
Rule 3620
Rule 3654
Rule 3715
Rubi steps
\begin {align*} \int \frac {(c+d \tan (e+f x))^{3/2}}{a+b \tan (e+f x)} \, dx &=\frac {\int \frac {2 b c d+a \left (c^2-d^2\right )+\left (2 a c d-b \left (c^2-d^2\right )\right ) \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}} \, dx}{a^2+b^2}+\frac {(b c-a d)^2 \int \frac {1+\tan ^2(e+f x)}{(a+b \tan (e+f x)) \sqrt {c+d \tan (e+f x)}} \, dx}{a^2+b^2}\\ &=\frac {(c-i d)^2 \int \frac {1+i \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}} \, dx}{2 (a-i b)}+\frac {(c+i d)^2 \int \frac {1-i \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}} \, dx}{2 (a+i b)}+\frac {(b c-a d)^2 \text {Subst}\left (\int \frac {1}{(a+b x) \sqrt {c+d x}} \, dx,x,\tan (e+f x)\right )}{\left (a^2+b^2\right ) f}\\ &=-\frac {(c-i d)^2 \text {Subst}\left (\int \frac {1}{(-1+x) \sqrt {c-i d x}} \, dx,x,i \tan (e+f x)\right )}{2 (i a+b) f}+\frac {(c+i d)^2 \text {Subst}\left (\int \frac {1}{(-1+x) \sqrt {c+i d x}} \, dx,x,-i \tan (e+f x)\right )}{2 (i a-b) f}+\frac {\left (2 (b c-a d)^2\right ) \text {Subst}\left (\int \frac {1}{a-\frac {b c}{d}+\frac {b x^2}{d}} \, dx,x,\sqrt {c+d \tan (e+f x)}\right )}{\left (a^2+b^2\right ) d f}\\ &=-\frac {2 (b c-a d)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {b} \sqrt {c+d \tan (e+f x)}}{\sqrt {b c-a d}}\right )}{\sqrt {b} \left (a^2+b^2\right ) f}-\frac {(c-i d)^2 \text {Subst}\left (\int \frac {1}{-1-\frac {i c}{d}+\frac {i x^2}{d}} \, dx,x,\sqrt {c+d \tan (e+f x)}\right )}{(a-i b) d f}-\frac {(c+i d)^2 \text {Subst}\left (\int \frac {1}{-1+\frac {i c}{d}-\frac {i x^2}{d}} \, dx,x,\sqrt {c+d \tan (e+f x)}\right )}{(a+i b) d f}\\ &=\frac {(c-i d)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{(i a+b) f}-\frac {(c+i d)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c+i d}}\right )}{(i a-b) f}-\frac {2 (b c-a d)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {b} \sqrt {c+d \tan (e+f x)}}{\sqrt {b c-a d}}\right )}{\sqrt {b} \left (a^2+b^2\right ) f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.41, size = 168, normalized size = 0.99 \begin {gather*} \frac {\sqrt {b} (-i a+b) (c-i d)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )+\sqrt {b} (i a+b) (c+i d)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c+i d}}\right )-2 (b c-a d)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {b} \sqrt {c+d \tan (e+f x)}}{\sqrt {b c-a d}}\right )}{\sqrt {b} \left (a^2+b^2\right ) f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(956\) vs.
\(2(142)=284\).
time = 0.56, size = 957, normalized size = 5.63
method | result | size |
derivativedivides | \(\frac {2 d^{2} \left (\frac {\frac {\frac {\left (-\sqrt {c^{2}+d^{2}}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, a c -\sqrt {c^{2}+d^{2}}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, b d +\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, a \,c^{2}-\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, a \,d^{2}+2 \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, b c d \right ) \ln \left (d \tan \left (f x +e \right )+c +\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right )}{2}+\frac {2 \left (-2 \sqrt {c^{2}+d^{2}}\, a \,d^{2}+2 \sqrt {c^{2}+d^{2}}\, b c d -\frac {\left (-\sqrt {c^{2}+d^{2}}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, a c -\sqrt {c^{2}+d^{2}}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, b d +\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, a \,c^{2}-\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, a \,d^{2}+2 \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, b c d \right ) \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{2}\right ) \arctan \left (\frac {2 \sqrt {c +d \tan \left (f x +e \right )}+\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right )}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}}{4 d}+\frac {-\frac {\left (-\sqrt {c^{2}+d^{2}}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, a c -\sqrt {c^{2}+d^{2}}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, b d +\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, a \,c^{2}-\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, a \,d^{2}+2 \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, b c d \right ) \ln \left (\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}-d \tan \left (f x +e \right )-c -\sqrt {c^{2}+d^{2}}\right )}{2}+\frac {2 \left (2 \sqrt {c^{2}+d^{2}}\, a \,d^{2}-2 \sqrt {c^{2}+d^{2}}\, b c d +\frac {\left (-\sqrt {c^{2}+d^{2}}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, a c -\sqrt {c^{2}+d^{2}}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, b d +\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, a \,c^{2}-\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, a \,d^{2}+2 \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, b c d \right ) \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{2}\right ) \arctan \left (\frac {\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}-2 \sqrt {c +d \tan \left (f x +e \right )}}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right )}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}}{4 d}}{d^{2} \left (a^{2}+b^{2}\right )}+\frac {\left (a d -b c \right )^{2} \arctan \left (\frac {b \sqrt {c +d \tan \left (f x +e \right )}}{\sqrt {\left (a d -b c \right ) b}}\right )}{d^{2} \left (a^{2}+b^{2}\right ) \sqrt {\left (a d -b c \right ) b}}\right )}{f}\) | \(957\) |
default | \(\frac {2 d^{2} \left (\frac {\frac {\frac {\left (-\sqrt {c^{2}+d^{2}}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, a c -\sqrt {c^{2}+d^{2}}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, b d +\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, a \,c^{2}-\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, a \,d^{2}+2 \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, b c d \right ) \ln \left (d \tan \left (f x +e \right )+c +\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right )}{2}+\frac {2 \left (-2 \sqrt {c^{2}+d^{2}}\, a \,d^{2}+2 \sqrt {c^{2}+d^{2}}\, b c d -\frac {\left (-\sqrt {c^{2}+d^{2}}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, a c -\sqrt {c^{2}+d^{2}}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, b d +\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, a \,c^{2}-\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, a \,d^{2}+2 \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, b c d \right ) \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{2}\right ) \arctan \left (\frac {2 \sqrt {c +d \tan \left (f x +e \right )}+\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right )}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}}{4 d}+\frac {-\frac {\left (-\sqrt {c^{2}+d^{2}}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, a c -\sqrt {c^{2}+d^{2}}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, b d +\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, a \,c^{2}-\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, a \,d^{2}+2 \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, b c d \right ) \ln \left (\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}-d \tan \left (f x +e \right )-c -\sqrt {c^{2}+d^{2}}\right )}{2}+\frac {2 \left (2 \sqrt {c^{2}+d^{2}}\, a \,d^{2}-2 \sqrt {c^{2}+d^{2}}\, b c d +\frac {\left (-\sqrt {c^{2}+d^{2}}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, a c -\sqrt {c^{2}+d^{2}}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, b d +\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, a \,c^{2}-\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, a \,d^{2}+2 \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, b c d \right ) \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{2}\right ) \arctan \left (\frac {\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}-2 \sqrt {c +d \tan \left (f x +e \right )}}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right )}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}}{4 d}}{d^{2} \left (a^{2}+b^{2}\right )}+\frac {\left (a d -b c \right )^{2} \arctan \left (\frac {b \sqrt {c +d \tan \left (f x +e \right )}}{\sqrt {\left (a d -b c \right ) b}}\right )}{d^{2} \left (a^{2}+b^{2}\right ) \sqrt {\left (a d -b c \right ) b}}\right )}{f}\) | \(957\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (c + d \tan {\left (e + f x \right )}\right )^{\frac {3}{2}}}{a + b \tan {\left (e + f x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 13.01, size = 2500, normalized size = 14.71 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________